Revert bad commit of gui/processwait,mainwindow
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 11 Jun 2014 02:57:44 +0000 (02:57 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 11 Jun 2014 02:57:44 +0000 (02:57 +0000)
gpsbabel/gui/mainwindow.cc
gpsbabel/gui/processwait.cc

index d7f670e78c1d7141e05f3fa2e197d9d5b079cce9..3ca27c5d178b98f08468fc50ffdeab013ccb9532 100644 (file)
@@ -955,8 +955,6 @@ void MainWindow::applyActionX()
     args << "-r";
   if (babelData_.xlateTracks_ && ifmt.isReadTracks()    && ofmt.isWriteTracks())
     args << "-t";
-  args << "-vs";
 
   // Input type, with options
   bool iisFile = (babelData_.inputType_ == BabelData::fileType_);
index cd756bfa86baf42810f3136326575e98a8eb9433..6160b73a86746be70ebaaae07e835f48072690ab 100644 (file)
@@ -26,7 +26,6 @@
 #include <QDialogButtonBox>
 #include <QVBoxLayout>
 #include <QDialog>
-#include <QDebug>
 #include <QProgressBar>
 #include <QPushButton>
 #include <QTimer>
@@ -99,7 +98,6 @@ ProcessWaitDialog::ProcessWaitDialog(QWidget *parent, QProcess *process):
   bufferedOut_ = "";
 
   //
-#if 0
   for (int i=0; i<=100; i+=2)
     progressVals_.push_back(i);
   for (int i=98; i>0; i-=2)
@@ -114,7 +112,7 @@ ProcessWaitDialog::ProcessWaitDialog(QWidget *parent, QProcess *process):
   ecode_ = 0;
   timer_->start();
   errorString_ = "";
-#endif
+
 }
 
 //------------------------------------------------------------------------
@@ -145,7 +143,6 @@ void ProcessWaitDialog::stopClickedX()
   process_->terminate();
 };
 //------------------------------------------------------------------------
-
 void ProcessWaitDialog::timeoutX()
 {
   progressIndex_++;
@@ -175,9 +172,7 @@ void ProcessWaitDialog::finishedX(int exitCode, QProcess::ExitStatus es)
   ecode_ = exitCode;
   if (es == QProcess::CrashExit)
     errorString_ = QString(tr("Process crashed whle running"));
-  if (timer_ != NULL) {
-//    timer_->stop();
-  }
+  timer_->stop();
   accept();
 };
 
@@ -206,30 +201,14 @@ void ProcessWaitDialog::appendToText(const char *ptr)
 void ProcessWaitDialog::readyReadStandardErrorX()
 {
   QByteArray d = process_->readAllStandardError();
-qDebug() << d;
-//  appendToText(d.data());
+  appendToText(d.data());
 };
 
 //------------------------------------------------------------------------
 void ProcessWaitDialog::readyReadStandardOutputX()
-{
+ {
   QByteArray d = process_->readAllStandardOutput();
-  QString status(d);
-  QStringList completion = QString(d).split("/");
-
-  // We'll sometimes get > 1.  This will also consume anything to stdout
-  // that isn't a vs output.  We'll see if that's OK.
-  if (completion.size() == 0) {
-    appendToText(d.data());
-    return;
-  }
-  if (completion.size() >= 3 && 
-      completion[2].toInt() > progressBar_->maximum()) {
-    progressBar_->setRange(0, completion[2].toInt());
-  } 
-  if (completion.size() >= 2) {
-    progressBar_->setValue(completion[1].toInt());
-  }
+  appendToText(d.data());
 };
 
 void ProcessWaitDialog::closeEvent(QCloseEvent *event)